[Previous] [Contents]
Activating JavaScript Commands From the Personal Toolbar
The personal toolbar, new in Navigator 4.0, provides simplified access to links,
commands, and page location information. It is located below the menu bar in the Navigator
window. Besides adding links to web pages, you can add JavaScript methods that are
activated when you click on their corresponding button in the toolbar. For example, you
can add a method that opens a new window. To add a JavaScript method to the personal
toolbar, you need to create a bookmark and define a command for that bookmark (instead of
a link).
- In the location bar, choose Bookmarks > Edit Bookmarks. This
opens the Bookmarks window.
- Open the Personal Toolbar Folder, and select the Folder. Opening
and selecting the folder insures that the new bookmark appears in the Personal Toolbar.
- Choose File > New Bookmark. This opens the Bookmark Properties
dialog.
- In the Name field, type the name you want to appear on the toolbar. For example, if you are writing a command that opens a window, you might
have a name of "Open Window."
- In the Location(URL) field, type the command using the form
javascript:void(command)
.
Only JavaScript methods can be used. For example, to open a window,
use javascript:void(window.open(""))
Using void
ensures that the original page is left unchanged.
- Click OK and close the Bookmarks window. A new button appears on
the Personal Toolbar. Clicking the button activates the command.
[Previous] [Contents]
Last Updated: 10/22/97 11:48:18